﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Data;
using Dijkstra;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Guid a = Universe.CreateStarSystem("A");
            Guid b = Universe.CreateStarSystem("B");
            Guid c = Universe.CreateStarSystem("C");
            Guid d = Universe.CreateStarSystem("D");

            WarpPointInfo ab = new WarpPointInfo(b, new MapIndex(a, 10, 10), "ab");
            WarpPointInfo ac = new WarpPointInfo(c, new MapIndex(a, 10, 15), "ac");
            WarpPointInfo ad = new WarpPointInfo(d, new MapIndex(a, 25, 25), "ad");
            WarpPointInfo ba = new WarpPointInfo(a, new MapIndex(b, 10, 10), "ba");
            WarpPointInfo bc = new WarpPointInfo(c, new MapIndex(b, 25, 25), "bc");
            WarpPointInfo ca = new WarpPointInfo(a, new MapIndex(c, 10, 10), "ca");
            WarpPointInfo cb = new WarpPointInfo(b, new MapIndex(c, 15, 15), "cb");
            WarpPointInfo cd = new WarpPointInfo(d, new MapIndex(c, 125, 25), "cd");
            WarpPointInfo da = new WarpPointInfo(a, new MapIndex(b, 10, 10), "da");
            WarpPointInfo dc = new WarpPointInfo(c, new MapIndex(b, 25, 25), "dc");

            Universe.LinkStarSystems(Universe.GetStarSystem(a), ab, ac, ad);
            Universe.LinkStarSystems(Universe.GetStarSystem(b), ba, bc);
            Universe.LinkStarSystems(Universe.GetStarSystem(c), ca, cb, cd);
            Universe.LinkStarSystems(Universe.GetStarSystem(d), da, dc);

            int dist = Universe.RangeTo(Universe.GetStarSystem(a).GetWarpPoint(ac.id).Location,
                Universe.GetStarSystem(a).GetWarpPoint(ad.id).Location);


            List<StarSystem> graph = new List<StarSystem>();
            graph.Add( Universe.GetStarSystem(a) );
            graph.Add( Universe.GetStarSystem(b) );
            graph.Add( Universe.GetStarSystem(c) );
            graph.Add( Universe.GetStarSystem(d) );

            List<StarSystem> orderedList = Dijkstra.Dijkstra.CalculateDistanceToAll(graph, ab.id, dc.id);
            

            int stop = 0;
        }
    }

}
